/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package experiments;

import java.net.Socket;

/**
 *
 * @author minaev
 */
public class Tern {
    public static Object testFunc(double r){
        return r>0.5 ? new Integer(1):new Socket();
    }
    
    public static void main(String[] args) {
        System.out.println("Tern class Int:"+Tern.testFunc(1).getClass().getName());
        System.out.println("Tern class Dbl:"+Tern.testFunc(0.1).getClass().getName());
    }
}
